package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchRealTimeDataMapper;
import com.ruoyi.system.domain.DispatchRealTimeData;
import com.ruoyi.system.service.IDispatchRealTimeDataService;

/**
 * 实时数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchRealTimeDataServiceImpl implements IDispatchRealTimeDataService 
{
    @Autowired
    private DispatchRealTimeDataMapper dispatchRealTimeDataMapper;

    /**
     * 查询实时数据
     * 
     * @param realTimeDataId 实时数据主键
     * @return 实时数据
     */
    @Override
    public DispatchRealTimeData selectDispatchRealTimeDataByRealTimeDataId(Long realTimeDataId)
    {
        return dispatchRealTimeDataMapper.selectDispatchRealTimeDataByRealTimeDataId(realTimeDataId);
    }

    /**
     * 查询实时数据列表
     * 
     * @param dispatchRealTimeData 实时数据
     * @return 实时数据
     */
    @Override
    public List<DispatchRealTimeData> selectDispatchRealTimeDataList(DispatchRealTimeData dispatchRealTimeData)
    {
        return dispatchRealTimeDataMapper.selectDispatchRealTimeDataList(dispatchRealTimeData);
    }

    /**
     * 新增实时数据
     * 
     * @param dispatchRealTimeData 实时数据
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchRealTimeData(DispatchRealTimeData dispatchRealTimeData)
    {
        return dispatchRealTimeDataMapper.insertDispatchRealTimeData(dispatchRealTimeData);
    }

    /**
     * 修改实时数据
     * 
     * @param dispatchRealTimeData 实时数据
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchRealTimeData(DispatchRealTimeData dispatchRealTimeData)
    {
        return dispatchRealTimeDataMapper.updateDispatchRealTimeData(dispatchRealTimeData);
    }

    /**
     * 批量删除实时数据
     * 
     * @param realTimeDataIds 需要删除的实时数据主键
     * @return 结果
     */
    @Override
    public int deleteDispatchRealTimeDataByRealTimeDataIds(Long[] realTimeDataIds)
    {
        return dispatchRealTimeDataMapper.deleteDispatchRealTimeDataByRealTimeDataIds(realTimeDataIds);
    }

    /**
     * 删除实时数据信息
     * 
     * @param realTimeDataId 实时数据主键
     * @return 结果
     */
    @Override
    public int deleteDispatchRealTimeDataByRealTimeDataId(Long realTimeDataId)
    {
        return dispatchRealTimeDataMapper.deleteDispatchRealTimeDataByRealTimeDataId(realTimeDataId);
    }
}
